#ifndef MYHARDWARE_H
#define MYHARDWARE_H

// Hardware Pins used - change these to match your setup

// NOTE - TOP SECTION for MEGA2560, BOTTOM SECTION FOR UNO!!!!!!


 #if defined(__AVR_ATmega2560__)
// ============ setup for the Mega 2560 - change these to match your setup =============

#define IR_PIN  2                   //  IR Sensor pin - MUST BE INTERRUPT PIN
#define LED_PIN 44                  //  LED goes off when signal is received

#define SOUND_PIN       A7          //  Ambient sound measurement
#define TEMPERATURE_PIN A6          //  Temperature measurement

#define M1_PIN          12          //  Motor1 (left) Direction Control (A)
#define E1_PIN           3          //  Motor1 Speed Control PWM

#define M2_PIN          13          //  Motor2 (right) Direction Control (B)
#define E2_PIN          11          //  Motor2 Speed Control PWM

#define GPS_PIN         16          //  GPS

#define SONAR_PIN       33          //  Front Distance Sensor
#define SONAR_SERVO_PIN A2          //  Servo Pin

#define MOTOR_ENC2_PIN  22          //  motor encoder
#define MOTOR_ENC1_PIN  23          //  motor encoder

#define MOTION_PIN      24          //  motion Sensor

#define SONAR_LEFT_PIN  25          //  Left Distance Sensor
#define SONAR_RIGHT_PIN 26          //  Right Distance Sensor

#define COLOR_LED_PIN   53          //  Color sensor LED light source pin,

#define LCD_I2C_ADDR  0x63 // 0xC6 but 7 bit does 63 Hex dvs.1100011 1100011 last bit disappear
#define ArduinoPlayer_address 0x35  //ArduinoPlayer I2C address 0x35 (default)

// Compass  uses I2C/TWI on Mega Pins 20 SDA (blk) and 21 SCL (white)- WIRE Library
// Color    uses I2C/TWI on Mega Pins 20 SDA (blk) and 21 SCL (white)- WIRE Library
// LCD      uses I2C/TWI on Mega Pins 20 SDA (blk) and 21 SCL (white)- WIRE Library
// Player   uses I2C/TWI on Mega Pins 20 SDA (blk) and 21 SCL (white)- WIRE Library

#else
// ========== setup for the UNO - change these to match your setup ===================

#define IR_PIN  2                   //  IR Sensor pin - MUST BE INTERRUPT PIN
#define LED_PIN 8                  //  LED goes off when signal is received

#define SOUND_PIN       A1         //  Ambient sound measurement
#define TEMPERATURE_PIN A2         //  Temperature measurement

#define M1_PIN          12          //  Motor1 (left) Direction Control (A)
#define E1_PIN           3          //  Motor1 Speed Control PWM

#define M2_PIN          13          //  Motor2 (right) Direction Control (B)
#define E2_PIN          11          //  Motor2 Speed Control PWM

#define MOTION_PIN       2          //  motion Sensor

#define SONAR_PIN       4          //  Front Distance Sensor
#define SONAR_SERVO_PIN A3          //  Servo Pin

#define SONAR_LEFT_PIN  10 // 62    //  Left Distance Sensor
#define SONAR_RIGHT_PIN A4          //  Right Distance Sensor

#define GPS_PIN         5          //  GPS

#define MOTOR_ENC2_PIN   6          //  motor encoder
#define MOTOR_ENC1_PIN   9         //  motor encoder

#define COLOR_LED_PIN   10          //  Color sensor LED light source pin,

#define LCD_I2C_ADDR  0x63 // 0xC6 but 7 bit does 63 Hex dvs.1100011 1100011 last bit disappear
#define ArduinoPlayer_address 0x35  //ArduinoPlayer I2C address 0x35 (default)

// Compass  uses I2C/TWI on Mega Pins 20 SDA (blk) and 21 SCL (white)- WIRE Library
// Color    uses I2C/TWI on Mega Pins 20 SDA (blk) and 21 SCL (white)- WIRE Library
// LCD      uses I2C/TWI on Mega Pins 20 SDA (blk) and 21 SCL (white)- WIRE Library
// Player   uses I2C/TWI on Mega Pins 20 SDA (blk) and 21 SCL (white)- WIRE Library

#endif


/*
  MEGA 2560 PINS

Each of the 54 digital pins on the Mega can be used as an input or output, using pinMode(), digitalWrite(), and
digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an
internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:

    Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and 16 (TX); Serial 3: 15 (RX) and
14 (TX). Used to receive (RX) and transmit (TX) TTL serial data. Pins 0 and 1 are also connected to the corresponding
pins of the ATmega16U2 USB-to-TTL Serial chip.

 External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5 also TX), 19 (interrupt 4 also rx),20 (int 3),
and 21 (interrupt 2). These pins can be configured to trigger an interrupt on a low value, a rising or falling edge,
 or a change in value. See the attachInterrupt() function for details.

    PWM: 0 to 13. Provide 8-bit PWM output with the analogWrite() function.

    SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI communication using the SPI library.
 The SPI pins are also broken out on the ICSP header
  */

#endif // MYHARDWARE_H
